<%@ page import="com.mlt.back.service.impl.BasicInfoServiceImpl" %>
<%@ page import="com.mlt.back.beans.BasicInfo" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
	// 获取数据
	List<BasicInfo> basicInfos = new BasicInfoServiceImpl().list();
%>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>规格类目管理页面</title>
</head>
<body>
<!--分类列表-->
<div>
    <div>
        <h4>产品所属分类</h4>
    </div>
    <div>
        <ul>
            <li>
                <button><a href="add_basic_info.jsp">添加</a></button>
            </li>
            <li>
                <button>批量删除</button>
            </li>
        </ul>
    </div>
</div>
<!--列表展示-->
<div style="float: left;margin-top: 50px;">
    <table id="tab01" border="1px solid #ccc" cellspacing="0" cellpadding="0">
        <thead>
        <tr>
            <th width="25px"><label><input type="checkbox"><span></span></label></th>
            <th width="80px">规格编号</th>
            <th width="250px">规格名称</th>
            <th width="100px">状态</th>
            <th width="180px">操作</th>
        </tr>
        </thead>
        <tbody style="text-align: center;">
		<%for (BasicInfo basicInfo : basicInfos) {%>
        <tr>
            <td width="25px"><label><input type="checkbox"><span></span></label></td>
            <td width="80px"><%=basicInfo.getBasic_info_id()%></td>
            <td width="250px"><%=basicInfo.getBasic_info_name()%></td>
            <td width="100px"><%=basicInfo.getBasic_info_status() == 0 ? "禁用" : "启用"%></td>
            <td width="100px">
                <button><a href="/mlt_war_exploded/modify_basic_info.jsp?basic_info_id=<%=basicInfo.getBasic_info_id()%>">修改</a></button>
                <button><a href="/mlt_war_exploded/basicInfo/remove?id=<%=basicInfo.getBasic_info_id()%>">删除</a></button>
            </td>
        </tr>
		<%}%>
        </tbody>
    </table>
</div>
</body>
</html>
